<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/5/10
  Time: 21:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
    <link href="css/style.css" rel="stylesheet"/>
    <link href="css/base.css" rel="stylesheet"/>
    <script src="js/jquery1.42.min.js" type="text/javascript"></script>
    <script src="js/jquery.SuperSlide.2.1.3.js" type="text/javascript"></script>
    <script src="js/flexible.min.js" type="text/javascript"></script>
    <script src="/js/cookie/jquery.cookie.js"></script>
    <%
            %>
    <title>个人中心</title>
</head>
<body style="background-color: rgb(242,242,242);">
<div>
    <div class="top_all">
        <div class="grxxInfo">
            <a href="/mobile/toGrzxInfo">
                <div class="Info_left"><img src="img/hy.png" class="picture"><div><div class="name">${ member.realName==null?member.name:member.realName}</div><div>欢迎登陆柠檬时代网</div></div></div>
                <div> <img src="img/hy14.png" class="gendou"></div>
            </a>
        </div>
        <div class="accouncement_merchants">
            <c:if test="${cookie.type.value!='3'}">
            <div>
                <a href="/mobile/real"><img src="img/hy13.png"><div>实名认证</div><p>折扣</p></a>
            </div>
            </c:if>
            <div>
                <a href="/mobile/toNoticeListPage"><img src="img/hy21.png"><div>公告</div></a>
            </div>
            <div>
                <a href="grzx_cooperation.html"><img src="img/hy22.png"><div>招商合作</div></a>
            </div>
        </div>
    </div>
    <div class="bottom_all">
        <ul class="record_list">
            <li>
                <a href="/mobile/toTradeRecordPage"><div><img src="img/hy19.png">交易记录</div></a>
            </li>
            <li>
                <a href="grzx_help.html"><div><img src="img/hy17.png">帮助中心</div></a>
            </li>
            <li>
                <a a href="jiaoyijil.html"><div><img src="img/hy20.png" >回收流程</div></a>
            </li>
            <li>
                <a href="/mobile/advice"><div><img src="img/hy18.png">建议反馈</div></a>
            </li>
            <c:if test="${type=='1'}">
            <li>
                <a  onclick="clearCookie()"><div><img src="img/hy100.png">退出</div></a>
            </li>
            </c:if>
        </ul>

    </div>
</div>
<div class="fount">
    <div>
        <a href="/mobile/index">
            <img src="img/home1.png">
            <div >首页</div>
        </a>
    </div>
    <div>
        <a href="/mobile/classification">
            <img src="img/hy123.png">
            <div>分类</div>
        </a>
    </div>
    <div>
        <a href="/mobile/sellCard">
            <img src="img/hy11.png">
            <div>卖卡</div>
        </a>
    </div>
    <div>
        <a href="/mobile/toMyInfo">
            <img src="img/my1.png">
            <div class="active">我的</div>
        </a>
    </div>

</div>
</div>
<script>
    function clearCookie() {
       deleteCookie();
        window.location.href="/mobile/toRegisterPage";

    }
    function deleteCookie() {
        var cookies = document.cookie.split(";");
        for (var i = 0; i < cookies.length; i++) {
            var cookie = cookies[i];
            var eqPos = cookie.indexOf("=");
            var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
            document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";
        }
        if(cookies.length > 0)
        {
            for (var i = 0; i < cookies.length; i++) {
                var cookie = cookies[i];
                var eqPos = cookie.indexOf("=");
                var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
                var domain = location.host.substr(location.host.indexOf('.'));
                document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=" + domain;
            }
        }
    }
</script>
</body>
</html>